# -*- coding: utf-8 -*-
# **********************************************************
# * Author        : 赵刚
# * Create time   : 2021/12/13 10:18
# * Description   :
# **********************************************************
from wtforms import IntegerField, StringField,FieldList,FormField,Form
from wtforms.validators import DataRequired, Length, AnyOf, NumberRange

from core.form.base import BaseForm

class LoginRequestForm(BaseForm):
    account = StringField (
        label='account',
        validators=[
            Length(max=20,min=1,message='account长度不能超过20个字符，不能少于1个字符')
        ],
        default=None
    )
    password = StringField(
        label='password',
        validators=[
            Length(max=10, min=1, message='password长度不能超过10个字符，不能少于1个字符')
        ],
        default=None
    )

class WeatherHistory(BaseForm):
    datefrom = StringField(
        label='datefrom',
        validators=[
        ],
        default=None
    )

class RemoteControl(BaseForm):
    datas = StringField(
        label='datas',
        default=[]
    )

class CreateAccountRequestForm(BaseForm):
    account = StringField (
        label='account',
        validators=[
            Length(max=20,min=5,message='account长度不能超过20个字符，不能少于5个字符')
        ],
        default=None
    )
    password = StringField(
        label='password',
        validators=[
            Length(max=10, min=1, message='password长度不能超过10个字符，不能少于1个字符')
        ],
        default=None
    )
class WaterLeakageAlarmStatisticsForm(BaseForm):
    equi = StringField(
        label='equi',
        validators=[
        ],
        default=None
    )
    datefrom = StringField(
        label='datefrom',
        validators=[
        ],
        default=None
    )
    dateto = StringField(
        label='dateto',
        validators=[
        ],
        default=None
    )
    sensorKey = StringField(
        label='sensorKey',
        validators=[
        ],
        default=None
    )